package org.ling.xuan.entity.mo;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class MarkFile {
    private String id;
    private String projectId;
    private String projectName;
    private String addId;
    private String svnPath;
    private String fileName;
    private String filePath;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ctdTime;
    private boolean relation;
    private boolean deleted;
    private String remark;
    
    public MarkFile toNewMark() {
        MarkFile mk = new MarkFile();
        mk.setId(StrUtil.uuid());
        mk.setProjectId(projectId);
        mk.setProjectName(projectName);
        mk.setAddId("");
        mk.setSvnPath(svnPath);
        mk.setFileName(fileName);
        mk.setFilePath(filePath);
        mk.setCtdTime(new Date());
        mk.setRelation(relation);
        mk.setDeleted(deleted);
        mk.setRemark(remark);
        return mk;
    }
}
